\(\int \cos ^7(a+b x) \, dx\) [7]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 54 \[ \int \cos ^7(a+b x) \, dx=\frac {\sin (a+b x)}{b}-\frac {\sin ^3(a+b x)}{b}+\frac {3 \sin ^5(a+b x)}{5 b}-\frac {\sin ^7(a+b x)}{7 b} \]

[Out]

sin(b*x+a)/b-sin(b*x+a)^3/b+3/5*sin(b*x+a)^5/b-1/7*sin(b*x+a)^7/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2713} \[ \int \cos ^7(a+b x) \, dx=-\frac {\sin ^7(a+b x)}{7 b}+\frac {3 \sin ^5(a+b x)}{5 b}-\frac {\sin ^3(a+b x)}{b}+\frac {\sin (a+b x)}{b} \]

[In]

Int[Cos[a + b*x]^7,x]

[Out]

Sin[a + b*x]/b - Sin[a + b*x]^3/b + (3*Sin[a + b*x]^5)/(5*b) - Sin[a + b*x]^7/(7*b)

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (a+b x)\right )}{b} \\ & = \frac {\sin (a+b x)}{b}-\frac {\sin ^3(a+b x)}{b}+\frac {3 \sin ^5(a+b x)}{5 b}-\frac {\sin ^7(a+b x)}{7 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00 \[ \int \cos ^7(a+b x) \, dx=\frac {\sin (a+b x)}{b}-\frac {\sin ^3(a+b x)}{b}+\frac {3 \sin ^5(a+b x)}{5 b}-\frac {\sin ^7(a+b x)}{7 b} \]

[In]

Integrate[Cos[a + b*x]^7,x]

[Out]

Sin[a + b*x]/b - Sin[a + b*x]^3/b + (3*Sin[a + b*x]^5)/(5*b) - Sin[a + b*x]^7/(7*b)

Maple [A] (verified)

Time = 1.28 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.78

method result size
derivativedivides \(\frac {\left (\frac {16}{5}+\cos ^{6}\left (b x +a \right )+\frac {6 \left (\cos ^{4}\left (b x +a \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (b x +a \right )\right )}{5}\right ) \sin \left (b x +a \right )}{7 b}\) \(42\)
default \(\frac {\left (\frac {16}{5}+\cos ^{6}\left (b x +a \right )+\frac {6 \left (\cos ^{4}\left (b x +a \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (b x +a \right )\right )}{5}\right ) \sin \left (b x +a \right )}{7 b}\) \(42\)
parallelrisch \(\frac {1225 \sin \left (b x +a \right )+5 \sin \left (7 b x +7 a \right )+49 \sin \left (5 b x +5 a \right )+245 \sin \left (3 b x +3 a \right )}{2240 b}\) \(48\)
risch \(\frac {35 \sin \left (b x +a \right )}{64 b}+\frac {\sin \left (7 b x +7 a \right )}{448 b}+\frac {7 \sin \left (5 b x +5 a \right )}{320 b}+\frac {7 \sin \left (3 b x +3 a \right )}{64 b}\) \(55\)

[In]

int(cos(b*x+a)^7,x,method=_RETURNVERBOSE)

[Out]

1/7/b*(16/5+cos(b*x+a)^6+6/5*cos(b*x+a)^4+8/5*cos(b*x+a)^2)*sin(b*x+a)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.80 \[ \int \cos ^7(a+b x) \, dx=\frac {{\left (5 \, \cos \left (b x + a\right )^{6} + 6 \, \cos \left (b x + a\right )^{4} + 8 \, \cos \left (b x + a\right )^{2} + 16\right )} \sin \left (b x + a\right )}{35 \, b} \]

[In]

integrate(cos(b*x+a)^7,x, algorithm="fricas")

[Out]

1/35*(5*cos(b*x + a)^6 + 6*cos(b*x + a)^4 + 8*cos(b*x + a)^2 + 16)*sin(b*x + a)/b

Sympy [A] (verification not implemented)

Time = 0.51 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.44 \[ \int \cos ^7(a+b x) \, dx=\begin {cases} \frac {16 \sin ^{7}{\left (a + b x \right )}}{35 b} + \frac {8 \sin ^{5}{\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{5 b} + \frac {2 \sin ^{3}{\left (a + b x \right )} \cos ^{4}{\left (a + b x \right )}}{b} + \frac {\sin {\left (a + b x \right )} \cos ^{6}{\left (a + b x \right )}}{b} & \text {for}\: b \neq 0 \\x \cos ^{7}{\left (a \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(b*x+a)**7,x)

[Out]

Piecewise((16*sin(a + b*x)**7/(35*b) + 8*sin(a + b*x)**5*cos(a + b*x)**2/(5*b) + 2*sin(a + b*x)**3*cos(a + b*x
)**4/b + sin(a + b*x)*cos(a + b*x)**6/b, Ne(b, 0)), (x*cos(a)**7, True))

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.81 \[ \int \cos ^7(a+b x) \, dx=-\frac {5 \, \sin \left (b x + a\right )^{7} - 21 \, \sin \left (b x + a\right )^{5} + 35 \, \sin \left (b x + a\right )^{3} - 35 \, \sin \left (b x + a\right )}{35 \, b} \]

[In]

integrate(cos(b*x+a)^7,x, algorithm="maxima")

[Out]

-1/35*(5*sin(b*x + a)^7 - 21*sin(b*x + a)^5 + 35*sin(b*x + a)^3 - 35*sin(b*x + a))/b

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.81 \[ \int \cos ^7(a+b x) \, dx=-\frac {5 \, \sin \left (b x + a\right )^{7} - 21 \, \sin \left (b x + a\right )^{5} + 35 \, \sin \left (b x + a\right )^{3} - 35 \, \sin \left (b x + a\right )}{35 \, b} \]

[In]

integrate(cos(b*x+a)^7,x, algorithm="giac")

[Out]

-1/35*(5*sin(b*x + a)^7 - 21*sin(b*x + a)^5 + 35*sin(b*x + a)^3 - 35*sin(b*x + a))/b

Mupad [B] (verification not implemented)

Time = 13.99 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.80 \[ \int \cos ^7(a+b x) \, dx=-\frac {\sin \left (a+b\,x\right )\,\left (5\,{\sin \left (a+b\,x\right )}^6-21\,{\sin \left (a+b\,x\right )}^4+35\,{\sin \left (a+b\,x\right )}^2-35\right )}{35\,b} \]

[In]

int(cos(a + b*x)^7,x)

[Out]

-(sin(a + b*x)*(35*sin(a + b*x)^2 - 21*sin(a + b*x)^4 + 5*sin(a + b*x)^6 - 35))/(35*b)